import axios from '../libs/api.request'

// 查询用户列表数据
export function queryUrseListData (params) {
  return axios.request({
    url: '/ids/security/user/page.json',
    params: params
  })
}
// 查询部门select list
export function queryOrgListSelect () {
  return axios.request({
    url: '/ids/security/org/tree.json'
  })
}

// 角色list
export function queryRoleList () {
  return axios.request({
    url: '/ids/security/role/queryRoleInfoLst.json'
  })
}

// 新增用户
export function addUser (params) {
  return axios.request({
    method: 'POST',
    url: '/ids/security/user/add.json',
    data: params
  })
}

// 修改用户
export function editUser (params) {
  return axios.request({
    method: 'PUT',
    url: '/ids/security/user/edit.json',
    data: params
  })
}

// 删除用户
export function deleteUser (userCode) {
  return axios.request({
    method: 'DELETE',
    url: `/ids/security/user/remove.json?userCode=${userCode}`
  })
}

// 重置密码
export function resetPassword (params) {
  return axios.request({
    url: '/ids/security/user/reset.json',
    params: params
  })
}
